package com.wxapp.custom.api.feign.fallback;

import com.wxapp.common.constant.base.IBaseService;
import com.wxapp.common.constant.pojo.vm.ResultVm;
import com.wxapp.custom.api.feign.UploadFeign;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author lgl
 * @Description
 * @Datetime 2023/2/13 13:50
 * @Modified By
 */
@Component
public class UploadFallBack extends IBaseService implements UploadFeign {


    @Override
    public ResultVm<String> uploadImage(HttpServletRequest request, MultipartFile file) throws Exception {
        return error("上传图片失败");
    }

    @Override
    public ResultVm<String> uploadImage(HttpServletRequest request, MultipartFile file, String path) throws Exception {
        return error("上传图片失败");
    }

    @Override
    public ResultVm<String> getFile(HttpServletResponse response, String name) {
        return error("获取文件失败");
    }
}
